<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8"
          content="width=device-width,height=device-height,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"
          name="viewport">
    <style>
        body{
            background: #00bdd4;
        }
        input{
            height: 38px;
            line-height: 1.3;
            line-height: 38px\9;
            border-width: 1px;
            border-style: solid;
            border-color: #c9c9c9;
            background-color: #fff;
            border-radius: 2px;
        }
        .btnshop {
            display: inline-block;
            width: 50%;
            height: 38px;
            line-height: 38px;
            padding: 0 18px;
            background-color: #009688;
            color: #fff;
            white-space: nowrap;
            text-align: center;
            font-size: 14px;
            border: none;
            border-radius: 2px;
            cursor: pointer;
            margin-bottom: 10px;
        }

        .left {
            width: 20%;
            float: right;
        }

        .right {
            width: 50%;
            float: right;
        }
        .login{
            text-align: center;
            margin-top: 200px;
            padding-top: 15px;
            padding-left: 25px;
            background-color: #fff;
            border-radius: 4px;
            }
        .dl{
                margin-left: -30px;
                margin-top: 40px;
            }
</style>
</head>
<body>
<div class="login">
<div style="display: flex;flex-direction: row;margin-bottom: 10px">
    <div class="left"><span>门店号</span></div>
    <div class="right"><input id="yaoMa" type="text" placeholder="请输入门店号"></div>
</div>
<div style="display: flex;flex-direction: row;margin-bottom: 10px">
    <div class="left"><span>密&nbsp;&nbsp;&nbsp;码</span></div>
    <div class="right"><input type="password" id="password" autocomplete="off" placeholder="请输入密码" lay-verify="required"
                              required>
    </div>
</div>
<div class="dl">
    <input id="btn" name="btn" class="layui-input btnshop" type="button" value="登录"/>
</div>
</div>
</body>
@/* 加入contextPath属性和session超时的配置 */
<script type="text/javascript">
    var Feng = {
        ctxPath: "${ctxPath}",
        version: '${constants.getReleaseVersion()}'
    };
</script>
<script type="text/javascript" src="${ctxPath}/assets/common/libs/layui/layui.all.js?v=${constants.getReleaseVersion()}"></script>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
<script type="application/javascript">

    $("#btn").on('click', function () {
        if ($("#yaoMa").val() != $("#password").val()) {
            layer.msg("密码输入错误！",{icon: 2,time:1000})
        } else {
            $.ajax({
                type: "POST",
                url: "/weiXinApi/judge",
                data: {yaoMa: $("#yaoMa").val()},
                async: false,
                success: function (data) {
                    if (data != "0") {
                        window.location.href = "/weiXinApi/meiTuanMsg?yaoMa=" + data;
                    } else {
                        layer.msg("登录失败！",{icon: 2,time:1000})
                    }
                }
            });
        }
    });
</script>
</html>